<?php
require_once('../includes/config.php');
$textlengh = 150;
if(isset($_GET['lastid']))
{
	$lastid=$_GET['lastid'];
	$result=mysql_query("SELECT * FROM tbl_product WHERE id<'$lastid' ORDER BY id DESC LIMIT 3");
	while($row=mysql_fetch_assoc($result))
	{
		extract($row);
?>
				<li class="product_grid">		
                    <div class="product_item image">
                        <div id="<?php echo $id; ?>  class="last_product">
                            <div class="column grid_twelve">
                                <div class="zenimage firstitem">
                                    <a href="index.php?mod=product&act=detail&id=<?php echo $id; ?>"><img src="<?php if($pro_img != ""){ echo $pro_img;} else { echo "images/not_available.jpg";} ?>" style="opacity: 1; height: 183px; "></a>
                                </div>
                                <div class="zentitle">
                                    <h2><a href="index.php?mod=product&act=detail&id=<?php echo $id; ?>"><?php echo $pro_name; ?></a></h2>
                                </div>										
                                <div class="zencategory">
								<?php 
								$catname = _GetCatName($pro_cat);
								echo $catname;
								?></div>
                                <div style="height:90px;"><p></p>
                                    <p>
										<?php 
											echo mb_substr(strip_tags($pro_detail), 0, $textlengh, 'UTF-8');
											echo "...";
										?>
                                    </p>
                                </div>
                                <div class="zenmore">
                                    <a href="index.php?mod=product&act=detail&id=<?php echo $id; ?>"><span class="readon">More ...</span></a>
                                </div>
                            </div>
                        </div>
                    </div>
                </li>
 			<div id="<?php echo $id; ?>" class="morebox">
</div>

<?php
	}
?>

<?php
}
?>

	